package com.example.ideaexithoot;

import com.intellij.ide.AppLifecycleListener;

public class ExitScriptAppListener implements AppLifecycleListener {
    @Override
    public void appClosing() {
        try {
            String autopush = AutoPushSettings.getInstance().autopushPath;
            if (autopush != null && !autopush.isBlank()) {
                Runtime.getRuntime().exec(autopush);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
